#!/bin/sh
# ----------------------------------------------------------------------
# name:         ch_merge_config.sh 
# version:      1.0
# createTime:   2018-03-26
# description:  修改配置的server_others
# author:       王文凡
# param:        server_id merge_ids
# ----------------------------------------------------------------------

if [ $# != 2 ] ; then
 echo "USAGE: $0 need targetServerId and codeServerId"
 exit 1;
fi

cd /server/gameserver_$1/config
sed -i  's/serverid_other,\[\([0-9]\|,\)*\]/serverid_other,\['$2'\]/g' server.config

echo 'process over'